
cc.Class({
    extends: cc.Component,

    properties: {

    },
    ctor:function(){
        this.bulletCount = 1;
    },
    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        let seq =cc.sequence(cc.scaleTo(0.5,0.5,0.5),cc.scaleTo(0.5,1,1));
        this.node.runAction(cc.repeatForever(seq));
        this.node.active = false;
    },

    start () {

    },


    // Methods
    startFire(){
        this.node.active = true;
        this.schedule(this.fireCallBack,0.1);
    },
    fireCallBack(){
        gameCtrl.createBullet( this.bulletCount);
    },
    endFire(){
        this.node.active = false;
        this.unschedule(this.fireCallBack);
    },
    setBulletcount(count){
        this.bulletCount = count;
    },
});
